<?php
include_once("../../config.php");
$plate=select_one_line_all_items($table_Prefix."plate","mid = 'equipment'");
?>

<?php include "../../coresection/checkSession.php";?>
<?php include "../../coresection/admin-product.php";?>
<?php include "../../coresection/order-list.php";?>

<?
//用来判断当前系统属于什么板块
$system_part = $plate['mid'];
include_once("detail-function.php");
?>



<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <?php include '../../modules/head.php'; ?>
</head>

<body>

<?php include '../../modules/topbar.php'; ?>

<div class="setup_area">


    <?php include '../../modules/sidebar-admin.php'; ?>

    <div class="header">
        <h1>设备调拨</h1>

        <?php include '../../modules/header.php'; ?>

    </div>




    <div class="content_area dishes_box">

        <!-- 用$system_part .list_boxes来控制来到确认板块信息显示-->


<form id="edit-equipment-form" method="post" action="detail-move-function.php?nav-itemed=equipment" enctype="multipart/form-data" class="layui-form">



    <?$equipment_list=select_lines_all_items($table_Prefix."equipment","","status  = '正常'","")?>

    <div class="layui-form-item">
        <label class="layui-form-label">设备</label>
        <div class="layui-input-block">

            <select name="nid">
                <?for($i=0;$i<count($equipment_list);$i++){?>
                <option value="<? echo $equipment_list[$i]['nid']?>"><? echo $equipment_list[$i]['name']?><? echo $equipment_list[$i]['mid']?>
                </option>
                <?}?>
            </select>
        </div>
    </div>









    <?
    $department_list=select_lines_all_items($table_Prefix."location","nid desc","","0");
    $department=select_one_line_all_items($table_Prefix."location","nid = '".$detail['departmentid']."'");
    ?>


    <div class="layui-form-item">
        <label class="layui-form-label">位置</label>
        <div class="layui-input-block">
            <select name="departmentid" >

                <option value="<? echo $detail['departmentid']?>"><? echo $department['name']?></option>

                <?for($i=0;$i<count($department_list);$i++){?>
                    <option value="<? echo $department_list[$i]['nid'] ?>"><? echo $department_list[$i]['name'];?></option>
                    <? ;} ?>
            </select>
        </div>
    </div>











    <div class="layui-form-item layui-form-text">
    <label class="layui-form-label">备注</label>
    <div class="layui-input-block">
      <textarea name="remark" placeholder="备注" class="layui-textarea"><? echo $detail['remark']?></textarea>
    </div>
  </div>







  <div class="layui-form-item">
    <div class="layui-input-block">
      <button class="layui-btn" lay-submit lay-filter="formequipmentAdd" type="submit">立即提交</button>
      <button type="reset" class="layui-btn layui-btn-primary">重置</button>
    </div>
  </div>



<input name="sys_part" type="hidden" value="<? echo $system_part ?>"/>
<input name="nowpageid" type="hidden" value="<? echo $_REQUEST['nowpageid'] ?>"/>
<input name="sortby" type="hidden" value="<? echo $_REQUEST['sortby'] ?>"/>



</form>





<script>
//Demo
//Demo
layui.use('form', function(){
  var form = layui.form();



  //监听提交
  // form.on('submit(formequipmentAdd)', function(data){
    // layer.msg(JSON.stringify(data.field));
    // layer.msg("这只是返回消息而已");
    // return false;
  // });




});
</script>


</ul>
</div>
</div>

<!--content端點01-->
</div>
<!--maincontent端點01-->
<br class="clearfloat"/>
</div>
<!--container端點01-->
</div>


<?php include '../../modules/footer.php'; ?>
</body>
</html>